# !/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
@作者 杨阳
@时间 2018-06-21
@说明 处理机构相关的请求
@注意事项
"""

from flask import Blueprint, request

from model.SystemModel import TGroupModel

group = Blueprint('group', __name__, url_prefix='/group')


@group.route("/tree/", methods=["POST"])
def user_grid():
    """
    查询机构树
    :return: json 字符串
    """
    parent_id = request.form.get("parent_id")
    return TGroupModel.get_group_tree(parent_id)
